package com.hgx.web.service.demo;

import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;


public class MainService {
    public static void main(String[] args) {
        JaxWsServerFactoryBean jaxWsServerFactoryBean = new JaxWsServerFactoryBean();
        jaxWsServerFactoryBean.setAddress("http://localhost:8080/demo");
        jaxWsServerFactoryBean.setServiceClass(DemoService.class);
        Server server = jaxWsServerFactoryBean.create();
        server.start();
        System.out.println("开张营业 ");
    }
}
